#ifndef ASSERT_EX_H_
#define ASSERT_EX_H_

#if WIN32
	#include <assert.h>
	
	#undef ASSERT
	#define ASSERT(arg1)					do{ if( !(arg1) ) {debug_out("%s(%d):assert",__FILE__,__LINE__);} }while(false);assert(arg1);

	void debug_out(const char* fmt, ...);
#endif

#if defined(TARGET_IPHONE_SIMULATOR) || defined(TARGET_OS_IPHONE)
	#ifdef _DEBUG
		#undef ASSERT
		#define ASSERT(arg1)			if (!(arg1)) { printf("assert %s failed(%d) %s\n", #arg1, __LINE__, __FILE__); }
	#else
		#undef ASSERT
		#define ASSERT(arg1)
	#endif
#endif

#endif//ASSERT_EX_H_